
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin")
const terserPlugin = require('terser-webpack-plugin')
module.exports = {

    output:{
        filename:'script/[name].[contenthash].js',
        publicPath:'http://ww.baidu.com' 
        //配置打包好文件前的域名路径 http://ww.baidu.com/favicon.ico
    },
    //!生产环境
    // mode: 'development',
    mode:'production' ,
    //! 优化配置
    optimization: {
        //压缩css 代码
        minimizer: [
            new CssMinimizerPlugin(),
            //压缩js代买
            new terserPlugin()
        ],   
    },
}